package com.cd.schedule.jpa.domain;

import com.cd.common.domain.BaseDomain;
import com.cd.common.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description 日程表实体信息
 * @Author lqq
 * @Date 2025/4/1 10:54
 **/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "db_schedule_entity")
public class ScheduleEntity {

    private static final Long serialVersionUID = 1L;

    @Id
    //@Comment("日程ID") 唯一主键
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long scheduleId;

    //数据id 时间戳
    @Column(name = "schedule_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    //日期 YYYY-MM-dd
    @Column(name = "date")
    private String date;

    //开始时间 8-24
    @Column(name = "start_hour", length = 5, columnDefinition = "VARCHAR(5)")
    private String startHour;

    //结束时间 8-24
    @Column(name = "end_hour", length = 5, columnDefinition = "VARCHAR(5)")
    private String endHour;

    //标题
    @Column(name = "title")
    private String title;

    //用户id
    @Column(name = "user_id")
    private Long userId;


}
